package com.service.student.imp;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.dao.student.SmessageDaoH;
import com.po.SmessageH;
import com.service.student.SmessageServiceH;
import com.util.TimeToStringUtil;

@Service
public class SmessageServiceImpH implements SmessageServiceH{

	@Resource(name="smessageDaoImpH")
	private SmessageDaoH smessageDao;

	@Override
	public List<SmessageH> getMessageList() {
		// TODO Auto-generated method stub
		return smessageDao.getMessageList();
	}

	@Override
	public int addMessage(SmessageH message) {
		// TODO Auto-generated method stub
		TimeToStringUtil time = new TimeToStringUtil();
		String str = time.timeToString();
		message.setMessage_id(str);
		return smessageDao.addMessage(message);
	}
	
}
